package com.sefon.smarteconomy.filter.cas;

import java.util.Arrays;
import java.util.List;

import org.springframework.boot.context.properties.ConfigurationProperties;

import com.sefon.smarteconomy.constant.Constants;

/**
 * 
* Copyright: Copyright (c) 2018 SefonSoft
* 
* @ClassName: SpringCasAutoconfig.java
* @Description: 获取spring.cas的配置
*
* @version: v1.0.0
* @author: SF2170
* @date: 2018年3月21日上午10:47:26
*
 */
@ConfigurationProperties(prefix = "spring.cas")  
public class SpringCasAutoconfig {

    private String validateFilters;  
    private String signOutFilters;  
    private String authFilters;  
    private String assertionFilters;  
    private String requestWrapperFilters;  
  
    private String ignoreFilters;
    private String casServerUrlPrefix;  
    private String casServerLoginUrl;  
    private String serverName;  
    private boolean useSession = true;  
    private boolean redirectAfterValidation = true;  
  
    public List<String> getValidateFilters() {  
        return Arrays.asList(validateFilters.split(Constants.SEPARATOR));  
    }  
    public void setValidateFilters(String validateFilters) {  
        this.validateFilters = validateFilters;  
    }  
    public List<String> getSignOutFilters() {  
        return Arrays.asList(signOutFilters.split(Constants.SEPARATOR));  
    }  
    public void setSignOutFilters(String signOutFilters) {  
        this.signOutFilters = signOutFilters;  
    }  
    public List<String> getAuthFilters() {  
        return Arrays.asList(authFilters.split(Constants.SEPARATOR));  
    }  
    public void setAuthFilters(String authFilters) {  
        this.authFilters = authFilters;  
    }  
    public List<String> getAssertionFilters() {  
        return Arrays.asList(assertionFilters.split(Constants.SEPARATOR));  
    }  
    public void setAssertionFilters(String assertionFilters) {  
        this.assertionFilters = assertionFilters;  
    }  
    public List<String> getRequestWrapperFilters() {  
        return Arrays.asList(requestWrapperFilters.split(Constants.SEPARATOR));  
    }  
    public void setRequestWrapperFilters(String requestWrapperFilters) {  
        this.requestWrapperFilters = requestWrapperFilters;  
    }  
    public List<String> getIgnoreFilters() {  
        return Arrays.asList(ignoreFilters.split(Constants.SEPARATOR));  
    }  
    public String getCasServerUrlPrefix() {  
        return casServerUrlPrefix;  
    }  
    public void setCasServerUrlPrefix(String casServerUrlPrefix) {  
        this.casServerUrlPrefix = casServerUrlPrefix;  
    }  
    public String getCasServerLoginUrl() {  
        return casServerLoginUrl;  
    }  
    public void setCasServerLoginUrl(String casServerLoginUrl) {  
        this.casServerLoginUrl = casServerLoginUrl;  
    }  

	public String getServerName() {  
        return serverName;  
    }  
    public void setServerName(String serverName) {  
        this.serverName = serverName;  
    }  
    public boolean isRedirectAfterValidation() {  
        return redirectAfterValidation;  
    }  
    public void setRedirectAfterValidation(boolean redirectAfterValidation) {  
        this.redirectAfterValidation = redirectAfterValidation;  
    }  
    public boolean isUseSession() {  
        return useSession;  
    }  
    public void setUseSession(boolean useSession) {  
        this.useSession = useSession;  
    }

	public void setIgnoreFilters(String ignoreFilters) {
		this.ignoreFilters = ignoreFilters;
	}  
  
}
